{% extends "_layout.html" %}
{% import "component/statistics.njk" as statistics %}

{# 样式代码 #}
{% block style %}
<title>统一出题-选择知识点</title>
<style type="text/css">
    .mui-content>.mui-table-view:first-child{margin: 0;}
    .mui-table-view-cell{ padding: 16px 15px;}
    .mui-table-view-cell>a:not(.mui-btn){margin: -16px -15px;}
</style>
{% endblock %}

{# bodyd代码#}
{% block body %}
<div class="mui-content">
    <!--选择教材-->
    <ul class="mui-table-view mui-table-view-chevron">
        <li class="mui-table-view-cell">
            <a href="version.html" class="mui-navigate-right">
                选择教材
                <span class="mui-badge mb-teching-masterial">{{data.name}}</span>
            </a>
        </li>
    </ul>
    <ul class="mui-table-view mt-10">
        {%for item in list%}
        <li class="mui-table-view-cell mui-collapse">
            <!--年级-->
            <a class="mui-navigate-right"  data-id="{{item.id}}">
                {{item.label}}
            </a>
            <div class="mui-collapse-content">
                <ul class="mb-table-view" >
                    {%for item2 in item.children%}
                    <li class="mb-table-view-cell mb-collapse">
                        <!--单元、章节-->
                        <a class="mb-navigate-right" href="javascript:;">{{item2.label}}</a>
                        <div class="mb-collapse-contents">
                            <ul class="mb-table-view">
                                {%for item3 in item2.children%}
                                <li class="mb-collapse">
                                    <!--课文、知识点-->
                                    <a  href="/selected?id={{item3.id}}" >{{item3.label}}</a>
                                </li>
                                {%endfor%}
                            </ul>
                        </div>
                    </li>
                    {%endfor%}
                </ul>
            </div>
        </li>
        {%endfor%}
    </ul>
</div>

<!--&lt;!&ndash;已选题目数量统计&ndash;&gt;-->
<!--<nav class="mui-bar mui-bar-tab mb-bar-tab1 xw-border-top">-->
    <!--<a class="mb-selected" href="homework-selected.html">已选题目（0）</a>-->
<!--</nav>-->
{% endblock %}

{#js代码#}
{% block js %}
<script src="js/jquery-2.1.1.min.js"></script>
<script>
    $(function(){
        $(".mb-table-view-cell .mb-navigate-right").click(function(){
            $(this).parent(".mb-table-view-cell").toggleClass("mui-active");
        });

        if(localStorage.getItem('teaching') == null){
            $('#teaching').html('请选择教材');
        }else{
            $('#teaching').html(localStorage.getItem('teaching'));
            // mui.get('/arrhomework2',{materialId:localStorage.getItem("id")},function(data){
            //         if(data.code!=200){
            //             console.log('错误');
            //         }else{
            //             console.log('正确 ');
            //         }
            //     },'json'
            // );
        }
    })
</script>
<!--flotdemo-->
{% endblock %}
